Xbasic

SQL::ConnectionInsertData Method

Syntax

Rows_Added as N = InsertData(TableOwner as C, TableName as C, ResultSet as SQL::ResultSet [, EventScript as C [, ReplicateIdentity = .f. as L]])

Arguments

TableOwnerCharacter

The owner of the table.

TableNameCharacter

The name of the table to receive the data.

ResultSetSQL::ResultSet

A SQL::ResultSet object that contains transactions to apply.

EventScriptCharacter

Default = "". An Xbasic Script implementing any of the following functions. In each case, the Context argument is the connection itself.

UpdateBegin()
UpdateProgress()
UpdateEnd()
ReplicateIdentity

Default = .F.

Returns

Rows_AddedNumeric

The number of new rows added.

Description

Apply new rows to a table in the currently connected database using a result set.

Discussion

The InsertData() method adds new rows to a table in the currently connected database using a result set. Note: If ReplicateIdentity is set to .T., identity column values are included in the insert and must be supplied when the SQL is executed.

Example

Refer to SQL::Connection::BeginTransaction().

See Also